package cn.seaboot.admin.flake.service;

import cn.seaboot.admin.flake.bean.FlakeResultMapping;
import cn.seaboot.admin.flake.dao.FlakeResultMappingDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Service
 * 结果字段映射 [T_FLAKE_RESULT_MAPPING]
 *
 * @author Mr.css on 2018-6-20
 */
@Service
public class FlakeResultMappingService {

    @Resource
    private FlakeResultMappingDao flakeResultMappingDao;

    /**
     * 增
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int insert(FlakeResultMapping pojo) {
        return flakeResultMappingDao.insert(pojo);
    }

    /**
     * 删
     *
     * @param id id
     * @return affected rows
     */
    public int deleteById(String id) {
        return flakeResultMappingDao.deleteById(id);
    }

    /**
     * 改
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int updateById(FlakeResultMapping pojo) {
        return flakeResultMappingDao.updateSampleById(pojo);
    }

    /**
     * 查
     *
     * @param id id
     * @return pojo
     */
    public FlakeResultMapping queryById(String id) {
        return flakeResultMappingDao.selectById(id);
    }

    /**
     * 查列表
     *
     * @param resultMap 参数
     * @return list
     */
    public List<FlakeResultMapping> queryList(String resultMap) {
        return flakeResultMappingDao.selectList(resultMap);
    }
}